package cn.boy.gui.adminstrator;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cn.boy.home.HomeApplication;
import cn.boy.home.R;

public class AdminSettingActivtiy extends Activity {
	
	Button button;
	HomeApplication app;

	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.admin_setting);
		
		button = (Button)findViewById(R.id.btn_password);
		
		app = (HomeApplication) getApplicationContext();
		
		button.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				Intent intent = new Intent(AdminSettingActivtiy.this,AdminChangePasswordActivity.class);
				startActivity(intent);
				finish();
			}
		});
		
	}
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode == KeyEvent.KEYCODE_BACK && event.getRepeatCount() == 0) {
			
			Intent intent = new Intent(this, AdminstratorMainActivity.class);
			startActivity(intent);
			finish();
			return true;
		}
		return super.onKeyDown(keyCode, event);
	}
}
